package com.example.springsecuritydemo.test;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.Arrays;

public class Main4 {
    public static void main(String[] args) {
        Greeting greeting=new Greeting();
        String s="asdweqwe";
        System.out.println(Arrays.toString("asdawds".getBytes()));
        ObjectOutputStream obi=null;
        ByteArrayOutputStream bai=null;
        try {
            bai=new ByteArrayOutputStream();
            obi=new ObjectOutputStream(bai);
            obi.writeObject(greeting);
            byte[] byt=bai.toByteArray();
            System.out.println("byt "+ Arrays.toString(byt));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
